home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / DHTML - Document Effects / doc-in-doc.izs < prev    next >
Text File  |  2005-08-31  |  4KB  |  39 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Document-in-document script
  4. <!/TITLE>
  5.  
  6. <!BROWSER>IE5+ Opr7+<!/BROWSER>
  7.  
  8. <!DESCRIPTION>Want to add the power of SSI to your site, but your web host doesn't support it? Use this script instead! It allows you to include a document inside another easily, simply by specifying the URL of the external document inside the "master" document. just like SSI. How does the script do that? With the help of a not-so-well-known DHTML feature in IE- scriplets. At it's bones, scriplets are a special kind of the <object> tag that supports a data" attribute. Put inside this attribute the file name of the external document, and the scriplet downloads and displays it as if it's part of the master document. By including the scriplet in multiple pages, a change to the target external document is instantly reflected on ALL of these pages. Ah, the power of DHTML!
  9.  
  10. <!/DESCRIPTION> 
  11.  
  12. <!CATEGORY>document effects<!/CATEGORY>
  13.  
  14. <!SCRIPT>
  15. <!-- START OF SCRIPT -->
  16. <!-- Step 1: Simply add the following chunk of code wherever you wish to include another document inside the current. Remember to configure the width/height and data attributes to match the specifications of the external document. -->
  17. <object type="text/x-scriptlet" width=100% height="250" data="data.htm">
  18. </object>
  19. <!-- One important note- scriplets are only supported by IE 4 and above. NS users will simply see nothing.
  20.  
  21. Just a few ideas on using scriplets. The external document to be downloaded by the scriplet should contain content that are the same across multiple webpages (such as the purple navigation buttons on the top of this page). By including the scriplet (instead of the actual content) on these pages, you can save yourself a lot of time when the time comes to editing this content- You simply do it once! There's no point in using a scriplet if you're only going to use it on one page. Another note- as mentioned earlier, scriplets are only supported by IE 4 and above. While this is definitely not good news in terms of cross browser compatibility, it may depend on your perspective. Since you know scriplets are only supported by IE 4 and above, the HTML document inside the scriplet can to designed to specifically target these users, without any fear of degradability with other browsers (since NS simply ignores scriplets). Be as creative as your imagination takes you- serve banners intended to be seen only by IE users, display content that utilizes all the whistles and bells of DHTML in IE, are just a few ideas you may want to sleep on...
  22. -->
  23. <!-- END OF SCRIPT -->
  24. <!/SCRIPT>
  25.  
  26. <!PREVIEW>
  27. <!-- START OF SCRIPT -->
  28.  
  29. <!-- Step 1: Simply add the following chunk of code wherever you wish to include another document inside the current. Remember to configure the width/height and data attributes to match the specifications of the external document. -->
  30. <object type="text/x-scriptlet" width=100% height="250" data="data.htm">
  31. </object>
  32. <!-- One important note- scriplets are only supported by IE 4 and above. NS users will simply see nothing.
  33.  
  34. Just a few ideas on using scriplets. The external document to be downloaded by the scriplet should contain content that are the same across multiple webpages (such as the purple navigation buttons on the top of this page). By including the scriplet (instead of the actual content) on these pages, you can save yourself a lot of time when the time comes to editing this content- You simply do it once! There's no point in using a scriplet if you're only going to use it on one page. Another note- as mentioned earlier, scriplets are only supported by IE 4 and above. While this is definitely not good news in terms of cross browser compatibility, it may depend on your perspective. Since you know scriplets are only supported by IE 4 and above, the HTML document inside the scriplet can to designed to specifically target these users, without any fear of degradability with other browsers (since NS simply ignores scriplets). Be as creative as your imagination takes you- serve banners intended to be seen only by IE users, display content that utilizes all the whistles and bells of DHTML in IE, are just a few ideas you may want to sleep on...
  35. -->
  36. <!-- END OF SCRIPT -->
  37. <!/PREVIEW>
  38.  
  39. <!RELATED>NONE<!/RELATED>